package com.mt.skyhoist.util.view;

import android.content.Context;
import androidx.annotation.Nullable;
import android.util.AttributeSet;
import android.widget.LinearLayout;

public class LockLinearlayout extends LinearLayout {
    public LockLinearlayout(Context context) {
        super(context);
    }

    public LockLinearlayout(Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
    }

    public LockLinearlayout(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }

    //
    private boolean canScrollHorizontallyEnable = true;
    public void setCanScrollHorizontally(boolean enable) {
        canScrollHorizontallyEnable = enable;
    }

    @Override
    public boolean canScrollHorizontally(int direction) {
        return canScrollHorizontallyEnable;
    }
}
